home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / gl_dev.idb / usr / include / gl / gri_ioctl.h.z / gri_ioctl.h
Encoding:
C/C++ Source or Header  |  1996-12-06  |  3.8 KB  |  113 lines

  1. /**************************************************************************
  2.  *                                      *
  3.  *          Copyright (C) 1989, Silicon Graphics, Inc.          *
  4.  *                                      *
  5.  *  These coded instructions, statements, and computer programs  contain  *
  6.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  7.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  8.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  9.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  10.  *                                      *
  11.  **************************************************************************/
  12.  
  13. #ifndef __GL_GRI_IOCTL_H__
  14. #define __GL_GRI_IOCTL_H__
  15. /*
  16.  * Ioctl's for input side of graphics.
  17.  *
  18.  * Written by: Kipp Hickman
  19.  *
  20.  * head/gl/gri_ioctl.h
  21.  * $Revision: 1.15 $
  22.  */
  23.  
  24. /*
  25.  * Versions this system supports.  Version tags must be in the upper
  26.  * 8 bits of the ioctl command (an unsigned long).
  27.  */
  28. #define    GRI_v1    1
  29.  
  30. /*
  31.  * Masks to get at parts of ioctl command
  32.  */
  33. #define    GRI_CMD        ((unsigned long)0x000000FF)
  34. #define    GRI_IN        ((unsigned long)0x0000FF00)
  35. #define    GRI_OUT        ((unsigned long)0x0FFF0000)
  36. #define    GRI_VERS    ((unsigned long)0xF0000000)
  37.  
  38. /*
  39.  * Macros to get values out of ioctl command
  40.  */
  41. #define    GRI_cmd(cmd)    ((unsigned long)(cmd) & GRI_CMD)
  42. #define    GRI_in(cmd)    ((unsigned long)((cmd) & GRI_IN) >> 8)
  43. #define    GRI_out(cmd)    ((unsigned long)((cmd) & GRI_OUT) >> 16)
  44. #define    GRI_vers(cmd)    ((unsigned long)((cmd) & GRI_VERS) >> 28)
  45.  
  46. /*
  47.  * Construct an ioctl from its version, command, input-size,
  48.  * and output-size
  49.  */
  50. #define    GRI_ioctl(vers, cmd, in, out) \
  51.     (((vers) << 28) | ((out) << 16) | ((in) << 8) | (cmd))
  52.  
  53. #ifdef    GRI_v1
  54.  
  55. #define    GRI_Q_SIZE        (50)
  56. /*
  57.  * Version 1 graphic input ioctl's
  58.  */
  59. #define    __v1(c)            GRI_ioctl(GRI_v1, c, 0, 0)
  60. #define    __v1R(c, in)        GRI_ioctl(GRI_v1, c, in, 0)
  61. #define    __v1W(c, out)        GRI_ioctl(GRI_v1, c, 0, out)
  62. #define    __v1RW(c, in, out)    GRI_ioctl(GRI_v1, c, in, out)
  63.  
  64. /* ioclt's */
  65. /* queue commands */
  66. #define GRI_ISMEX        __v1(0) /* OBSOLETE */
  67. #define GRI_INITINPUT        __v1(1)
  68. #define GRI_NULL        __v1(2)
  69. #define GRI_QDEVICE        __v1(3)
  70. #define GRI_UNQDEVICE        __v1(4)
  71. #define GRI_SETVALUATOR        __v1R(5,4*sizeof(short))
  72. #define GRI_GETVALUATOR        __v1(6)
  73. #define GRI_GETBUTTON        __v1(7)
  74. #define GRI_QRESET        __v1(8)
  75. #define GRI_QREAD        __v1W(9,2*sizeof(short))
  76. #define GRI_QENTER        __v1R(10,2*sizeof(short))
  77. #define GRI_NOISE        __v1R(11,2*sizeof(short))
  78. #define GRI_TIE            __v1R(12,3*sizeof(short))
  79. #define GRI_ATTACHCURSOR    __v1R(13,2*sizeof(short))
  80. #define GRI_ISQUEUED        __v1(14)
  81. #define GRI_SCRTIMEOUT        __v1(15)
  82. #define GRI_CHANGEBUTTON    __v1(16)
  83. #define GRI_CHANGEVALUATOR    __v1(17)
  84. #define GRI_CHANGEDEVICE    __v1(18)
  85. #define GRI_RESERVEBUTTON    __v1R(21,2*sizeof(short)) /* OBSOLETE */
  86. #define GRI_GETDEV        __v1R(30,4*sizeof(short))    
  87. #define GRI_MOUSEWARP        __v1R(31,2*sizeof(short))
  88. #define GRI_ANYQENTER        __v1R(32,3*sizeof(short)) /* OBSOLETE */
  89. #define GRI_CURRENTIC        __v1(33)          /* OBSOLETE */
  90. #define GRI_FINDDEV        __v1(34)
  91. #define GRI_CURSOROFFSET    __v1R(37,2*sizeof(short))
  92. #define GRI_ANYISQUEUED        __v1R(38,2*sizeof(short))
  93. #define GRI_QTEST        __v1(40)
  94. #define GRI_SAVE_QUEUE        __v1W(42, GRI_Q_SIZE )      /* OBSOLETE */
  95. #define GRI_RESTORE_QUEUE    __v1R(43, GRI_Q_SIZE )      /* OBSOLETE */
  96. #define GRI_MEX_DORMANT     __v1(44)          /* OBSOLETE */
  97. #define GRI_BLKANYQENTER    __v1R(45, GRI_Q_SIZE )
  98. #define GRI_BLKCHANGEDEVICE    __v1R(46, GRI_Q_SIZE )
  99. #define GRI_SETREPEAT        __v1R(47,2*sizeof(short))
  100. #define GRI_GETREPEAT        __v1W(48,2*sizeof(short))
  101. #define GRI_GETMOUSEWARP    __v1W(49,2*sizeof(short))
  102. #define GRI_ADDDEVICE        __v1R(50,2*sizeof(short))
  103. #define GRI_SETFOCUS        __v1R(51,1*sizeof(short))
  104. #define GRI_GETFOCUS        __v1W(52,1*sizeof(short))
  105.  
  106. /*
  107.  * define this to be the largest number of SHORTS copied in or out
  108.  */
  109. #define    GRI_v1_LARGEST        GRI_Q_SIZE
  110. #endif /* GRI_v1 */
  111.  
  112. #endif /* __GL_GRI_IOCTL_H__ */
  113.